d0b64f2ac11f038cc7d32f46b6ac22fc651283db,src/edu/stanford/nlp/parser/lexparser/TreeBinarizer.java,TreeBinarizer,transformTree,#Tree#,460

Before Change


    // XXXXX UPTO HERE!!!  ALMOST DONE!!!
    if (t.label().value().startsWith(tlp.startSymbol())) {
      // handle the ROOT tree properly
      CategoryWordTag label = (CategoryWordTag) t.label();
      /*
      // binarize without the last kid and then add it back to the top tree
      Tree lastKid = (Tree)newChildren.remove(newChildren.size()-1);

After Change


      newChildren = tempTree.getChildrenAsList();
      newChildren.add(lastKid); // add it back
      */
      result = tf.newTreeNode(t.label(), newChildren); // label shouldn't have changed
    } else {
//      CategoryWordTag headLabel = (CategoryWordTag) headChild.label();
      String word = ((HasWord) headChild.label()).word();